<html>
<head>
    <meta charset="utf-8">
    <title>丁丁麻将 - 我的账单</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link rel="apple-touch-icon" href="../../../images/favicon.ico" />
    <link rel="icon" href="../../../images/favicon.ico" />
    <link rel="stylesheet" href="../../../css/weuix.min.css" type="text/css" />
    <link rel="stylesheet" href="../../../css/custom.css" type="text/css" />
    <script src="../../../js/zepto.min.js" type="text/javascript"></script>
    <script src="../../../js/php.js" type="text/javascript"></script>

    <style type="text/css">
        .weui-footer {
            padding-top: 3em;
            padding-bottom: 1.52em;
        }

        .weui_panel_ft.f-red:before {
            display: none;
        }

        .weui_panel_ft.f-red:after {
            display: none;
        }
    </style>

</head>
<body ontouchstart class="page-bg">
<div class="weui-share" id="share_weixin">
    <div class="weui-share-box">
        点击右上角请使用手机浏览器打开继续操作！<i></i>
    </div>
</div>
<?php if (empty($list)) :?>
    <div class="weui_msg">
        <div class='weui_msg_box'>
            <div class="weui-loadmore weui-loadmore-line">
                <span class="weui-loadmore-tips">暂无任何相关数据</span>
            </div>
        </div>
    </div>
<?php else:?>
<?php foreach ($list as $key => $val) :?>
<div class="weui_panel weui_panel_access">
    <div class="weui_panel_hd"><?= $val['OrderId']?> <i style="float:right;" class="weui_icon_<?= empty($val['PayStatus']) ? 'warn': 'success'?>"></i></div>
    <a class="weui_panel_bd" href="/pay/return-result-url?out_trade_no=<?= $val['OrderId']?>">
        <div class="weui_media_box weui_media_appmsg">
            <div class="weui_media_hd weui-updown">
                <img class="weui_media_appmsg_thumb imgthumb lazyload" src="<?= urldecode($val['ProductImages'])?>" onerror="javascript:this.src='../../../images/holder.png'" alt="<?= $val['ProductName']?>" />
            </div>
            <div class="weui_media_bd">
                <h4 class="weui_media_title"><?= $val['ProductName']?></h4>
                <p class="weui_media_desc">
                    <?= $val['CheckTime']?>
                </p>
            </div>
            <span class="weui_panel_ft f-red f18">&#165;<?= $val['Amount']?></span>
        </div>
    </a>
</div>
<?php endforeach;
$thispage = yii::$app->request->get('page');
?>
<div class="pager" id="_pager_">
    <div class="pager-left">
        <div class="pager-first"><a href=<?= (empty($thispage) || $thispage==1) ? 'javascript:;' : '/pay/order-list?userid='.$userid?> class="pager-nav">首页</a></div>
        <div class="pager-pre"><a href=<?= (empty($thispage) || $thispage==1) ? 'javascript:;' : '/pay/order-list?userid='.$userid.'&page='.($page - 1)?> class="pager-nav">上一页</a></div>
    </div>
    <div class="pager-cen"><?= $page?>/<?= $page_count?></div>
    <div class="pager-right">
        <div class="pager-next"><a href=<?= ($page == $page_count) ? 'javascript:;' : '/pay/order-list?userid='.$userid.'&page='.($page + 1)?> class="pager-nav">下一页</a></div>
        <div class="pager-end"><a href=<?= ($page == $page_count) ? 'javascript:;' : '/pay/order-list?userid='.$userid.'&page='.$page_count?> class="pager-nav">尾页</a></div>
    </div>
</div>
<?php endif;?>

<div class="weui-footer <?= empty($list) ? 'weui-footer-fixed-bottom' : ''?>">
    <p class="weui-footer-links">
        <a href="javascript:;" class="weui-footer-link">武汉百游网络科技有限公司</a>
    </p>
    <p class="weui-footer__text">Copyright &copy; <script>
            document.write(new Date().getFullYear())
        </script> baiyouyx.com</p>
</div>

<div id="preloader">
    <div class="loading">
        <div class="dot white"></div>
        <div class="dot"></div>
        <div class="dot"></div>
        <div class="dot"></div>
        <div class="dot"></div>
    </div>
</div>
<script src="../../../js/fastclick.js" type="text/javascript"></script>
<script type="text/javascript">
    $(window).on("load", function () {
        $("#preloader>.loading").fadeOut("slow", function () {
            $("#preloader").fadeOut("slow");
        });
    });
    var ua = browser.version;
    var _width = parseInt(window.screen.width);
    var scale = _width / 480;
    if (ua.android) {
        scale = scale > 1.0 ? 0.8 : scale;
        $("meta[name='viewport']").attr("content", "width=device-width,initial-scale=" + scale + ",minimum-scale=" + scale + ",maximum-scale=" + scale + ",user-scalable=no")
    }
    FormatMoney = function (num) {
        num = num.toString().replace(/\$|\,/g, '');
        if (isNaN(num)) num = "0";
        sign = (num == (num = Math.abs(num)));
        num = Math.floor(num * 100 + 0.50000000001);
        cents = num % 100;
        num = Math.floor(num / 100).toString();
        if (cents < 10) cents = "0" + cents;
        for (var i = 0; i < Math.floor((num.length - (1 + i)) / 3) ; i++)
            num = num.substring(0, num.length - (4 * i + 3)) + ',' +
                num.substring(num.length - (4 * i + 3));
        return '¥' + (((sign) ? '' : '-') + num + '.' + cents);
    }
    $(function () {
        FastClick.attach(document.body);
    });
</script>

</body>
</html>
